﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="XM.aspx.cs" Inherits="Xiaov.SmartWeb.Application.TZGC.XM" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Resources/momo/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../Resources/momo/report.css" rel="stylesheet" type="text/css" />
    <link href="../Resources/momo/gridview.css" rel="stylesheet" type="text/css" />
    <link href="../Resources/momo/icon.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/Resources/easyui-1.32/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/Resources/easyui-1.32/themes/icon.css"/>
    <link rel="stylesheet" type="text/css" href="/Resources/xiaovcn/css/main.css"/>
    <script type="text/javascript" src="/Resources/easyui-1.32/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/Resources/easyui-1.32/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/Resources/xiaovcn/scripts/usercheck.js"></script>
    <script language="javascript">
        function checkform() {
            return $("#form1").form('validate');
        }
        function aa() {
            if (confirm('Are you sure？')) {
                return true;
            }
            return false;
        }

        $(function () {
            $('#content').height(userScreenHeight);
        });

    
    </script>
    <style type="text/css">
 
        .GridViewStyle
        {
            border-style: dotted;
            border-color: #808080;
            font-size: 12px;
            border-top-width: 1px;
            border-right-width: 1px;
            border-bottom-width: 1px;
            border-left-width: 1px;
            border-collapse: collapse;
        }
        table
        {
            border-collapse: collapse;
        }
        
        .GridViewHeaderStyle
        {
            font-weight: normal;
            color: #333333;
            border-collapse: collapse;
        }
        
        .GridViewSelectedRowStyle, td, th
        {
            border-width: 1px;
            border-color: #808080;
            border-style: dotted;
            font-size: 12px;
            border-collapse: collapse;
        }
        
        .GridViewRowStyle, td, th
        {
            padding: 3px;
        }
        
        .GridViewHeaderStyle tr, th
        {
            background-color: #F2F2F2;
            background-image: url('http://localhost/themes/default/images/datagrid_title_bg.png');
            height: 25px;
        }
        .GridViewRowStyle
        {
            color: #333333;
        }
        .GridViewStyle a
        {
            color: #333333;
        }
        
        .GridViewAlternatingRowStyle
        {
            /*background-color: #E4EEFC;*/
            background-color: #F7F7F7;
        }
        
        .GridViewPagerStyle
        {
            background-color: #F7F7F7;
            color: #FFFFFF;
        }
        .GridViewPagerStyle table td
        {
            border-width: 0px;
            border-style: solid;
        }
        .GridViewPagerStyle tr td span
        {
            border-right: #000099 1px solid;
            padding-right: 5px;
            border-top: #000099 1px solid;
            padding-left: 5px;
            font-weight: bold;
            padding-bottom: 2px;
            margin: 2px;
            border-left: #000099 1px solid;
            color: #fff;
            padding-top: 2px;
            border-bottom: #000099 1px solid;
            background-color: #000099;
        }
        .GridViewPagerStyle tr td a
        {
            border-right: #aaaadd 1px solid;
            padding-right: 5px;
            border-top: #aaaadd 1px solid;
            padding-left: 5px;
            padding-bottom: 2px;
            margin: 2px;
            border-left: #aaaadd 1px solid;
            color: #000099;
            padding-top: 2px;
            border-bottom: #aaaadd 1px solid;
            text-decoration: none       ;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="content" style="overflow:scroll; ">
    <table width="100%">
        <tr>
            <td valign="top">
                <asp:TreeView ID="TreeView1" runat="server" ShowLines="true" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged"
                    ExpandDepth="1">
                    <RootNodeStyle HorizontalPadding="3px" ImageUrl="~/images/tree/folder_plus.png" />
                    <ParentNodeStyle HorizontalPadding="3px" ImageUrl="~/images/tree/folder.png" />
                    <SelectedNodeStyle ImageUrl="~/images/tree/folder_open.png" CssClass="tabs-header" />
                    <LeafNodeStyle HorizontalPadding="3px" ImageUrl="~/images/tree/folder.png" />
                </asp:TreeView>
            </td>
            <td valign="top">
                <table>
                    <tr>
                        <td>
                            完成状态：<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                                <asp:ListItem Value="1">已完成</asp:ListItem>
                                <asp:ListItem Value="0">未完成</asp:ListItem>
                                <asp:ListItem Value="-1" Selected="True">全部</asp:ListItem>
                            </asp:DropDownList>
                            项目名称：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            <asp:Button ID="Button6" runat="server" Text="查询" OnClick="Button6_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound"
                                OnRowCommand="GridView1_RowCommand" CssClass="GridViewStyle" AllowPaging="True"
                                OnPageIndexChanging="GridView1_PageIndexChanging" PageSize="11" OnRowCreated="GridView1_RowCreated"
                                Width="100%" DataKeyNames="SSPXBM">
                                <Columns>
                                    <asp:BoundField HeaderText="序号" ItemStyle-HorizontalAlign="Center">
                                        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="XMBM" HeaderText="项目编码" ItemStyle-HorizontalAlign="Center">
                                        <ItemStyle HorizontalAlign="Center" Width="200px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="XMMC" HeaderText="项目名称" ItemStyle-HorizontalAlign="Center">
                                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="项目类别" />
                                    <asp:BoundField DataField="JZGCBL" HeaderText="建筑工程比例">
                                        <HeaderStyle Width="80px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="AZGCBL" HeaderText="安装工程比例">
                                        <HeaderStyle Width="80px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="SBGZBL" HeaderText="设备购置比例">
                                        <HeaderStyle Width="80px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="QTBL" HeaderText="其他比例">
                                        <HeaderStyle Width="60px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="zt" HeaderText="完成状态" />
                                    <asp:TemplateField HeaderText="操作">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="Button2" runat="server" CommandArgument='<%# Eval("XMID") %>'
                                                CommandName="bianji" Text="编辑" />
                                            &nbsp;|&nbsp;<asp:LinkButton ID="Button4" runat="server" CommandArgument='<%#Eval("XMID") %>'
                                                CommandName="shanchu" Text="删除" OnClientClick="return aa()" />
                                            &nbsp;|
                                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="guishu" CommandArgument='<%# Eval("XMID") %>'>工程归属</asp:LinkButton>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="rowid" HeaderText="rowid" />
                                    <asp:BoundField DataField="XMID" HeaderText="XMID" />
                                    <asp:BoundField DataField="SSPXBM" HeaderText="所属排序编码" />
                                </Columns>
                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                <RowStyle CssClass="GridViewRowStyle" />
                                <PagerSettings FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PageButtonCount="5"
                                    PreviousPageText="上一页" />
                                <PagerStyle CssClass="GridViewPagerStyle" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td>
                                        项目名称：
                                    </td>
                                    <td>
                                        <asp:HiddenField ID="hfXMID" runat="server" />
                                        <asp:TextBox ID="txtxmmc" runat="server" class="easyui-validatebox" required="true"
                                            missingMessage="必填项" Width="300px"></asp:TextBox>
                                    </td>
                                </tr>
                                <%-- <tr>
                    <td>
                      项目年度：
                    </td>
                    <td>
                      <asp:TextBox ID="txtnd" runat="server" class="easyui-numberbox" required="true" min="2000"
                        max="2050" precision="0" missingMessage="必填项" Width="100px"></asp:TextBox>
                    </td>
                  </tr>--%>
                                <tr>
                                    <td>
                                        所属类别：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtlb" runat="server" class="easyui-validatebox" required="true"
                                            missingMessage="必填项" Width="500px" ReadOnly="true">
                                        </asp:TextBox>
                                        <asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="选择" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        建筑工程比例：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtJZGCBL" runat="server" class="easyui-numberbox"  Width="50px">
                                        </asp:TextBox>%
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        安装工程比例：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAZGCBL" runat="server" class="easyui-numberbox"   Width="50px">
                                        </asp:TextBox>%
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        设备购置比例：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtSBGZBL" runat="server" class="easyui-numberbox"   Width="50px">
                                        </asp:TextBox>%
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        其它比例：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtQTBL" runat="server" class="easyui-numberbox"   Width="50px">
                                        </asp:TextBox>%
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        是否完成：
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="cbSFWC" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Button ID="btn_save" runat="server" Text="增加" OnClick="btn_save_Click" OnClientClick="return checkform();" />
                                        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="清空" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <asp:Panel ID="Panel1" runat="server" Visible="false">
        <table>
            <tr>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="XMNDrowid："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtxmndrowid" runat="server" class="easyui-validatebox" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="XMrowid："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtxmrowid" runat="server" class="easyui-validatebox" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="项目编码："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtxmbm" runat="server" class="easyui-validatebox" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="所属类别编码："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtlbbm" runat="server" class="easyui-validatebox" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label4" runat="server" Text="所属排序编码："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtsspxbm" runat="server" class="easyui-validatebox" Width="300px"></asp:TextBox>
                </td>
            </tr>
        </table>
    </asp:Panel></div>
    </form>
</body>
</html>
